var Sequelize = require('sequelize');
var C = require('../../../config');

var mysql = C.mysqlServers[0];
var uri = 'mysql://' +
    mysql.user + ':' + mysql.password + // user:pass
    '@' + mysql.host + ':' + mysql.port + // host:port
    '/' + C.mysqlDatabase;

console.log(uri);

var seq = new Sequelize(
    C.mysqlDatabase,
    mysql.user,
    mysql.password,
    {
        host: mysql.host,
        port: mysql.port
    }
);

// set up connection to mysql
module.exports = seq;